package com.axin.system.api;

import com.axin.common.core.constant.ServiceNameConstants;
import com.axin.common.core.domain.web.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Set;

/**
 * 权限服务 远程调用
 *
 * @author lixin
 */
@FeignClient(contextId = "remotePermissionService", value = ServiceNameConstants.SYSTEM_SERVICE, path = "/perm")
public interface RemotePermissionService {

    /**
     * 根据用户ID查询权限列表
     *
     * @param userId
     * @return
     */
    @GetMapping("/get/{userId}")
    AjaxResult<Set<String>> getMenuPermission(@PathVariable("userId") Long userId);
}
